Object.defineProperty(exports, "__esModule", {
    value: !0
}), exports.getSystemSecrect = exports.getSystemName = exports.getJwt = exports.createSign = void 0;

var e = require("request"), t = require("storage"), r = require("crypto-js"), o = require("../utils/config"), s = exports.createSign = function() {
    var e = t.getStorageSync(t.storageKey.uid), o = t.getStorageSync(t.storageKey.openId), s = "MemberId=".concat(e, "&MemberIdType=0&OpenId=").concat(o, "&OpenIdType=1&SystemSalt=").concat("9VqHq"), n = r.SHA256(s).toString();
    return console.log(n), n;
};

exports.getJwt = function() {
    var r = t.getStorageSync(t.storageKey.uid), n = t.getStorageSync(t.storageKey.openId), c = s();
    return e.request(e.HttpMethod.POST, "".concat(o.selfSelectedOrderUrl, "SelfSelect/AccessSystem/GetJwt"), {
        systemName: "WeChatApplet",
        systemSecret: "D70F9BE27C4E888DF1BEDE4E298B4747",
        memberId: r,
        memberIdType: 0,
        openId: n,
        openIdType: 1,
        sign: c
    });
}, exports.getSystemName = function() {
    return "WeChatApplet";
}, exports.getSystemSecrect = function() {
    return "D70F9BE27C4E888DF1BEDE4E298B4747";
};